package com.tulele.vtool.utils;

import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;

public class RsaTool {

    /**
     * 测试方法
     */
    //public static void main(String[] args)
    public static void test()
    {
        Map<String, Object> map = new HashMap<String, Object>();
        map = RsaTool.init();

        String publicKey = RsaTool.getPublicKey(map);
        String privateKey =RsaTool.getPrivateKey(map);

//        System.out.println("公钥："+RsaTool.getPublicKey(map));
//        System.out.println("私钥："+RsaTool.getPrivateKey(map));
        //由前四行代码获得公、私密钥
//        String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCLNbmKl9/gLn7Bef/xtUkshC1WyrLZLRpXCcFYR1gQi0isWsZBTicC4efBOkkNG3r+1ue0gvtuU/tjREFGf4Y7HaKHGb5tNCOlMNeNjM5YLRwLFqrUSsQyD4rj4eua1ltearr24R0HilnTvnQm6Z/UY0s21vdOUFQBPY0GNAa+0wIDAQAB";
//        String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIs1uYqX3+AufsF5//G1SSyELVbKstktGlcJwVhHWBCLSKxaxkFOJwLh58E6SQ0bev7W57SC+25T+2NEQUZ/hjsdoocZvm00I6Uw142MzlgtHAsWqtRKxDIPiuPh65rWW15quvbhHQeKWdO+dCbpn9RjSzbW905QVAE9jQY0Br7TAgMBAAECgYBcYhbzpr5no/Nyqmf0G/6nkEAWbQYrogbs5AhvcUk8EXL1DnirNhYlj42hafC4xhflrvCtlo8NNKaLxewbwN1uuzG8A2jd+ROEXlx5HDh2ZluhtHzL/SmNcJXo684xAl2pCNVBjDcW48PcIBijke/sTVHTDsDCukLKDPUOM/mKIQJBAL96k4+jBscazsJiuZ6C3RFDVtRRDpf1dMgLgxcx63bAXkA2Arau0J49IAYmSVJoDXqDoJKWdXJVh9vHSkhN/48CQQC6Hk1/G0Y0nOylf6NOp0oMgc0A+etnwxHKqwtctPKjEYcJx2fzALzTtCoySLYXX7gLnPIQXpQBTUysG5skBKp9AkEAiSQm6fqu0Q4fRlRlc+VwpnufhgPkOuw/z0OHiaZkajJPjxfgC63bl2paNG1ZmJ8UAEqkSDlhNxmRa9UqG+1ZewJASaQxz6gwCCNLM1SkfjuM/hPh1JAOh9jUUleJQF5MXx9RSho/VBQnorB3vbutaOQzw0yPLtDtSPKX8sVdhkveVQJAIDsJP5X8Tey6zXTUISor7PF0TSiKdE4k0IwKoy9y8HmQ+AU8+xyr/iOt5lvaGxKlBK8N/7yCw5H4qHnJaHT+Bg==";

        String str = "<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;  text-align: justify;       background-color: rgb(255, 255, 255);  \"><section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" class=\"_135editor\"><section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><section data-role=\"outer\" label=\"Powered by 135editor.com\" style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; font-family: 微软雅黑;\"><section data-tools=\"135编辑器\" data-id=\"89065\" style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\" class=\"_135editor\"><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; font-size: 16px;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><br/></span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; font-size: 16px;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">想让你的家人生活过的更好吗？</span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; font-size: 16px;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">是否考虑过倍增你的个人资产？</span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; font-size: 16px;\" align=\"center\"><strong><span style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">想不想快速实现你的梦想？</span></strong></p><p style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em;\"><br style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"/></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; font-size: 16px;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">其实，实现这一切，</span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em;\" align=\"center\"><span style=\"font-size: 16px;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; line-height: 22.4px; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">最好的途径就是</span><span style=\"margin: 0px; padding: 0px; max-width: 100%; color: #ff0000; font-size: 16px; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">创业！</strong></span></span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #000000;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><br style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"/></strong></span></p><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em;\" align=\"center\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #000000;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><img data-ratio=\"0.74\" data-s=\"300,640\" data-type=\"jpeg\" data-w=\"450\" width=\"auto\" _width=\"auto\" class=\"\" src=\"http://zktfile.wxslzf.com/ps/20201026/7d764c82-301a-4ab7-a884-533d0e9ad8ec.jpg\" data-fail=\"0\" style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; height: auto !important; font-size: 16px; line-height: 25.6px; text-align: center;  color: #3e3e3e; background-color: #ffffff; visibility: visible !important; width: auto !important;\"/></strong></span></p></section></section></section></section></section><p style=\"text-align:center;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;\" align=\"center\"><br style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"/></p><p style=\"text-align:left;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;\" align=\"left\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #000000; text-decoration: underline; font-size: 18px;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"></strong></span></p><section class=\"_135editor\" data-tools=\"135编辑器\" data-id=\"98861\"><section class=\"_135editor\"><section style=\"margin: 10px auto;text-align: center;\"><section style=\"display: inline-block;\"><section class=\"assistant\" style=\"width: 50px;margin-bottom: -32px;margin-left: -20px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);\" data-width=\"50px\"><img class=\"assistant\" style=\"width: 100%; display: block;\" src=\"http://zktfile.wxslzf.com/ps/20201026/b464dbd5-e59e-43ea-b3f0-3a263ee16ee0.jpg\" data-ratio=\"0.7611940298507462\" data-w=\"67\" data-width=\"100%\"/></section><section style=\"display: flex;justify-content: center;align-items: center;\"><section class=\"135brush\" data-brushtype=\"text\" style=\"width: 40x;font-size: 16px;color:#fff;font-weight: bold;letter-spacing: 1.5px;background:#565ae3;padding:8px 1em 8px 3em;\">创业太难，无能为力？</section><section class=\"assistant\" style=\"width: 0px;height: 1px;border-top: 20px solid transparent;border-left: 20px solid #565ae3; border-bottom: 21px solid transparent;\" data-width=\"0px\"></section></section></section></section></section></section><p style=\"text-align:left;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;\" align=\"left\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: #000000; text-decoration: underline; font-size: 18px;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"></strong></span></p><p style=\"text-align:left;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;\" align=\"left\"><span style=\"text-align: justify; font-family: 微软雅黑, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; caret-color: red;\">估计有人会说：</span><span style=\"text-align: justify; font-family: 微软雅黑, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; caret-color: red;\">创业，不仅需要有足够的想法与能力，</span><strong style=\"text-align: justify; font-family: 微软雅黑, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; caret-color: red;\">还需要投入无数的人力、物力、财力…也正因为这个原因使得很多人都不敢一试。</strong><br/></p><p><br style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\"/></p><p style=\"text-align:justify;margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; clear: both; min-height: 1em; color: rgb(51, 51, 51); font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 17px;     letter-spacing: 0.544px;\" align=\"justify\"><img data-s=\"300,640\" data-type=\"png\" data-ratio=\"0.6313432835820896\" data-w=\"670\" _width=\"670px\" class=\"\" src=\"http://zktfile.wxslzf.com/ps/20201026/4ad76128-68c8-4102-af08-6db4fb3042fd.jpg\" data-fail=\"0\" style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; height: auto !important; width: 100%; visibility: visible !important;\"/></p><p><br/></p><p style=\"text-align: justify;\" align=\"justify\">没人脉、没经验、没资金，却想创业的都看过来！<strong>拼多多好货内购直营行动，超100万人注册平台创业能人！只要你有好的idea，我们助你实现创业梦！</strong></p><p><br/></p><p><span style=\"caret-color: red;\">我知道素未谋面的朋友，你来自社会的各个行业，你的出身不同，处境不同，贫富不同，现状不同，但我们面对这个知识大爆炸的时代顶着的压力是一样的！</span></p><p><span style=\"caret-color: red;\"><br/></span></p><p><span style=\"caret-color: red;\">我们同样有家庭，我们同样有父母，我们同样有小孩。我们同样有理想！</span><br/></p><p><span style=\"caret-color: red;\"><br/></span></p><p><span style=\"caret-color: red;\"><img src=\"http://zktfile.wxslzf.com/ps/20201026/2cbe4881-1702-4a1d-a2e2-47d203c928d5.png\" data-ratio=\"1\" alt=\"image.png\"/></span></p><p><br/></p><section class=\"_135editor\" data-tools=\"135编辑器\" data-id=\"98861\"><section class=\"_135editor\"><section style=\"margin: 10px auto;text-align: center;\"><section style=\"display: inline-block;\"><section class=\"assistant\" style=\"width: 50px;margin-bottom: -32px;margin-left: -20px;transform: rotate(0deg);-webkit-transform: rotate(0deg);-moz-transform: rotate(0deg);-o-transform: rotate(0deg);\" data-width=\"50px\"><img class=\"assistant\" style=\"width: 100%; display: block;\" src=\"http://zktfile.wxslzf.com/ps/20201026/86e16795-26b5-45a0-8a56-425842b07ece.jpg\" data-ratio=\"0.7611940298507462\" data-w=\"67\" data-width=\"100%\"/></section><section style=\"display: flex;justify-content: center;align-items: center;\"><section class=\"135brush\" data-brushtype=\"text\" style=\"width: 40x;font-size: 16px;color:#fff;font-weight: bold;letter-spacing: 1.5px;background:#565ae3;padding:8px 1em 8px 3em;\">王炸级别的拼多多好货内购来袭！</section><section class=\"assistant\" style=\"width: 0px;height: 1px;border-top: 20px solid transparent;border-left: 20px solid #565ae3; border-bottom: 21px solid transparent;\" data-width=\"0px\"></section></section></section></section></section></section><p><br/></p><p><span style=\"caret-color: red; text-indent: 2em; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\">旧的思维正在被颠覆，“互联网+”即将催生新的商业规则！</span><strong>拼多多好货内购</strong><span style=\"caret-color: red; text-indent: 2em; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\">万亿级空白市场，等你跑马圈地！</span></p><p><br/></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;      caret-color: #FF0000;    max-width: 100%; display: inline !important; overflow-wrap: break-word !important;\">好货内购由拼多多直接运营管理，依托于微信小程序，</span><span style=\"font-size: 16px; font-family: 微软雅黑, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-weight: 400; font-style: normal; color: #000000; text-decoration: none solid #000000;\">借助拼多多强大的技术和供</span><span style=\"max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;      caret-color: #FF0000;    max-width: 100%; display: inline !important; overflow-wrap: break-word !important;\">应链，再加上丰富的收益和补贴，帮店主打造</span><span style=\"max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;    letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;      caret-color: #FF0000;    font-weight: 700; max-width: 100%; color: #FF2941; display: inline !important; overflow-wrap: break-word !important;\">『品牌内购』</span><span style=\"max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;      caret-color: #FF0000;    max-width: 100%; display: inline !important; overflow-wrap: break-word !important;\">。让店主在自己的私域开一家品牌特卖店，轻松赚钱。</span></p><p><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><br/></span></p><p><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><img src=\"http://zktfile.wxslzf.com/ps/20201026/1de0ee36-e7c2-447a-af33-2bcdc1490018.png\" data-ratio=\"1\" alt=\"image.png\"/></span></p><p><strong><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><br/></span></strong></p><p><strong><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \">拼多多用了3年就完成上市，成立5年，活跃用户突破6亿多</span></strong><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \">，现在拼多多全新打造好货内购项目，<strong>市场推广和运营都拥有强大的优势</strong>。有拼多多作为好货内购的背书，<strong>就是好货内购平台最大的优势。&nbsp;</strong></span></p><p><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><br/></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\">每一位拼多多用户都是潜在的好货内购用户，市场潜力巨大。<strong style=\"max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; color: rgb(0, 0, 0); font-family: 微软雅黑, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;      text-align: justify;       caret-color: rgb(255, 0, 0);   \"><span style=\";max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; display: inline !important;;max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; max-width: 100%; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; font-size: 16px; overflow-wrap: break-word !important;\">而好货内购</span></strong><span style=\";max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; font-size: 16px;      text-align: justify;      caret-color: #FF0000;    color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-indent: 34px; display: inline !important;;max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; max-width: 100%; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; font-size: 16px; overflow-wrap: break-word !important;\">是拼多多直营的品牌特卖平台；</span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><span style=\";max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; font-size: 16px;      text-align: justify;      caret-color: #FF0000;    color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-indent: 34px; display: inline !important;;max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; max-width: 100%; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; font-size: 16px; overflow-wrap: break-word !important;\"><br/></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><span style=\";max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; font-size: 16px;      text-align: justify;      caret-color: #FF0000;    color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-indent: 34px; display: inline !important;;max-inline-size: 100%; margin: 0px; padding: 0px; box-sizing: border-box !important; outline: none 0px !important; cursor: text; max-width: 100%; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; font-size: 16px; overflow-wrap: break-word !important;\"><img src=\"http://zktfile.wxslzf.com/ps/20201026/07b4b2c7-400e-474c-87d0-d68663df90aa.png\" data-ratio=\"1\" alt=\"image.png\"/></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><strong><br/></strong></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><strong>店长只需通过微信朋友圈、微信群、微信好友快速分享品牌商品或品牌专场，消费者通过分享的链接购买交易完成后，系统自动结算佣金，操作简单。</strong></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><strong><br/></strong></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><strong><img src=\"http://zktfile.wxslzf.com/ps/20201026/6bd08987-a667-4056-8746-1b825a16c736.png\" data-ratio=\"1\" alt=\"image.png\"/></strong></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><br/></span></p><p style=\"text-align:justify;\" align=\"justify\">消费者通过分享的链接购买交易完成后，系统自动结算佣金，<strong>整个链路完整，通畅，保证高触达，高转化！</strong></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\"><br/></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"text-indent: 34px; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\">且相比以往的社交电商平台的跳转导流机制，好货内购项目不导流不跳转，<strong>用户直接在店长小程序内成交，只要店长与客户保持高度互动，店长的客户依然是他的专属客源。</strong>&nbsp;</span></p><p style=\"text-align:justify;\" align=\"justify\"><br/></p><p><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><img src=\"http://zktfile.wxslzf.com/ps/20201026/ec8ab591-8d9e-4df1-9150-d26acf2da9f6.png\" data-ratio=\"1\" alt=\"image.png\"/></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify; text-indent: 34px;         display: inline !important; \"><img src=\"http://zktfile.wxslzf.com/ps/20201026/66339cd7-416c-4466-841d-9b11d7d89028.png\" data-ratio=\"1\" alt=\"image.png\"/></span></p><p style=\"text-align:justify;\" align=\"justify\"><br/></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">拼</span><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">多多官方补贴</span><span style=\"letter-spacing: 0.544px; text-align: justify; font-weight: 700; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; margin: 0px; padding: 0px; max-width: 100%; color: #FF2941; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">20亿</span><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">做好货内购这个项目，在该平台上购物，可以用其他平台</span><span style=\"letter-spacing: 0.544px; text-align: justify; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; color: #FF2941; margin: 0px; padding: 0px; max-width: 100%; font-weight: 700; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">7~8折</span><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">的价格买到同样的商品；</span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><br/></span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">而分享好货内购，还可以拿到其他平台</span><span style=\"letter-spacing: 0.544px; text-align: justify; font-weight: 700; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; margin: 0px; padding: 0px; max-width: 100%; color: #FF2941; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">2.5倍</span><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\">的佣金。</span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><br/></span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><img src=\"http://zktfile.wxslzf.com/ps/20201026/a9c5fdd0-ac06-4249-82c4-314f7830d95f.png\" data-ratio=\"1\" alt=\"image.png\"/></span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; font-size: 16px; display: inline !important;\"><span style=\"margin: 0px; padding: 0px; max-width: 100%; letter-spacing: 0.544px; text-align: justify; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; text-indent: 34px; display: inline !important; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><br/></span></span></span></p><p style=\"text-align:justify;\" align=\"justify\"><br/></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"caret-color: red; text-indent: 2em; color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px; letter-spacing: 0.544px; text-align: justify; display: inline !important;\">现在已经进进入消费时代，得消费者得天下！市场流行两个名词通路为王和流量为王。通路为王是：谁能够拥有商品的流通渠道，谁就是赢家;流量为王是谁拥有庞大的访问量流量，谁就可以获得财富。</span></p><p style=\"text-align:justify;\" align=\"justify\"><br/></p><p style=\"text-align:justify;\" align=\"justify\">毫无疑问的是，<strong>拼多多好货内购与上千个品牌合作，强大背景做靠山，消费者，流量，商品咱都有了！财富自然流向我们！</strong></p><p><br/></p><p><img src=\"http://zktfile.wxslzf.com/ps/20201026/ce92a6f0-a491-4b78-a751-f8831ec01f9c.png\" data-ratio=\"1\" alt=\"image.png\"/></p><p><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><br/></span></p><p style=\"text-align:justify;\" align=\"justify\"><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\">总结起来我们拼多多好货内购就是</span><span style=\"color: #D82821;\"><strong><span style=\"letter-spacing: 0.544px; caret-color: red; font-size: 16px; text-indent: 2em; max-width: 100%; overflow-wrap: break-word !important;\">精挑细选，正品，低价，大牌，高佣</span></strong></span><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\">，给足大家动力，必须卖爆。此外，<strong><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \">0门槛、多品牌、高收益，无需囤货</span></strong><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \">，不用操心物流和售后，平台运营规则完全合法合规！</span></span></p><p><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \"><br/></span></span></p><p style=\"text-align:center;\" align=\"center\"><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \"><img src=\"http://zktfile.wxslzf.com/ps/20201026/add8978a-2173-4c57-b164-b18fca1af0ee.png\" data-ratio=\"1\" alt=\"image.png\"/></span></span></p><p><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \"><br/></span></span></p><p><strong><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \">遇见一个千载难逢的创业机会，就别错过！</span></span></strong><span style=\"letter-spacing: 0.544px; caret-color: red; color: #272D34; font-size: 16px; text-indent: 2em;\"><span style=\"color: #333333; font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; font-size: 16px;     letter-spacing: 0.544px;  text-align: justify;          display: inline !important; \">非常适合我们无人脉，无经验，无资金的人群</span></span>，<strong>这是一份日入可过百过千甚至过万的副业</strong>！就等你来了！</p>";

        System.out.println("明明文明文：" + str);
        // 公钥加密，私钥解密
        String enStr1 = RsaTool.encryptByPublicKey(str, publicKey);
        System.out.println("公钥加密后：" + enStr1);
        String deStr1 = RsaTool.decryptByPrivateKey(enStr1, privateKey);
        System.out.println("私钥解密后：" + deStr1);
        // 私钥加密，公钥解密
        String enStr2 = RsaTool.encryptByPrivateKey(str, privateKey);
        System.out.println("私钥加密后：" + enStr2);
        String deStr2 = RsaTool.decryptByPublicKey(enStr2, publicKey);
        System.out.println("公钥解密后：" + deStr2);
        // 产生签名
        String sign = sign(enStr2, privateKey);
        System.out.println("签名:" + sign);
        // 验证签名
        boolean status = verify(enStr2, publicKey, sign);
        System.out.println("状态:" + status);

    }

    //定义加密方式
    public static final String KEY_RSA = "RSA";
    //定义公钥关键词
    public static final String KEY_RSA_PUBLICKEY = "RSAPublicKey";
    //定义私钥关键词
    public static final String KEY_RSA_PRIVATEKEY = "RSAPrivateKey";
    //定义签名算法
    private final static String KEY_RSA_SIGNATURE = "MD5withRSA";
    /**
     * **
     * RSA最大加密大小
     */
    private final static int MAX_ENCRYPT_BLOCK = 117;

    /**
     * **
     * RSA最大解密大小
     */
    private final static int MAX_DECRYPT_BLOCK = 128;

    /**
     * 生成公私密钥对
     */
    public static Map<String, Object> init()
    {
        Map<String, Object> map = null;
        try
        {
            KeyPairGenerator generator = KeyPairGenerator.getInstance(KEY_RSA);
            //设置密钥对的bit数，越大越安全，但速度减慢，一般使用512或1024
            generator.initialize(1024);
            KeyPair keyPair = generator.generateKeyPair();
            // 获取公钥
            RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
            // 获取私钥
            RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
            // 将密钥对封装为Map
            map = new HashMap<String, Object>();
            map.put(KEY_RSA_PUBLICKEY, publicKey);
            map.put(KEY_RSA_PRIVATEKEY, privateKey);
        } catch (NoSuchAlgorithmException e)
        {
            e.printStackTrace();
        }

        return map;
    }

    /**
     * 获取Base64编码的公钥字符串
     */
    public static String getPublicKey(Map<String, Object> map)
    {
        String str = "";
        Key key = (Key) map.get(KEY_RSA_PUBLICKEY);
        str = encryptBase64(key.getEncoded());
        return str;
    }

    /**
     * 获取Base64编码的私钥字符串
     */
    public static String getPrivateKey(Map<String, Object> map)
    {
        String str = "";
        Key key = (Key) map.get(KEY_RSA_PRIVATEKEY);
        str = encryptBase64(key.getEncoded());
        return str;
    }

    /**
     * BASE64 解码
     *
     * @param key 需要Base64解码的字符串
     * @return 字节数组
     */
    public static byte[] decryptBase64(String key)
    {
        return Base64.getDecoder().decode(key);
    }

    /**
     * BASE64 编码
     *
     * @param key 需要Base64编码的字节数组
     * @return 字符串
     */
    public static String encryptBase64(byte[] key)
    {
        return new String(Base64.getEncoder().encode(key));
    }

    /**
     * 公钥加密
     *
     * @param encryptingStr
     * @param publicKeyStr
     * @return
     */
    public static String encryptByPublicKey(String encryptingStr, String publicKeyStr)
    {
        try
        {
            // 将公钥由字符串转为UTF-8格式的字节数组
            byte[] publicKeyBytes = decryptBase64(publicKeyStr);
            // 获得公钥
            X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKeyBytes);
            // 取得待加密数据
            byte[] data = encryptingStr.getBytes("UTF-8");
            KeyFactory factory;
            factory = KeyFactory.getInstance(KEY_RSA);
            PublicKey publicKey = factory.generatePublic(keySpec);
            // 对数据加密
            Cipher cipher = Cipher.getInstance(factory.getAlgorithm());
            cipher.init(Cipher.ENCRYPT_MODE, publicKey);
            // 返回加密后由Base64编码的加密信息
            int inputLen = data.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段解密
            while (inputLen - offSet > 0)
            {
                if (inputLen - offSet > MAX_ENCRYPT_BLOCK)
                {
                    cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
                } else
                {
                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_ENCRYPT_BLOCK;
            }
            byte[] decryptedData = out.toByteArray();
            out.close();
            return encryptBase64(decryptedData);
        } catch (Exception e)
        {
            e.printStackTrace();
        }

        return null;
    }

    /**
     * 私钥解密
     *
     * @param encryptedStr
     * @param privateKeyStr
     * @return
     */
    public static String decryptByPrivateKey(String encryptedStr, String privateKeyStr)
    {
        try
        {
            // 对私钥解密
            byte[] privateKeyBytes = decryptBase64(privateKeyStr);
            // 获得私钥
            PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);
            // 获得待解密数据
            byte[] data = decryptBase64(encryptedStr);
            KeyFactory factory = KeyFactory.getInstance(KEY_RSA);
            PrivateKey privateKey = factory.generatePrivate(keySpec);
            // 对数据解密
            Cipher cipher = Cipher.getInstance(factory.getAlgorithm());
            cipher.init(Cipher.DECRYPT_MODE, privateKey);
            // 返回UTF-8编码的解密信息
            int inputLen = data.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段解密
            while (inputLen - offSet > 0)
            {
                if (inputLen - offSet > MAX_DECRYPT_BLOCK)
                {
                    cache = cipher.doFinal(data, offSet, MAX_DECRYPT_BLOCK);
                } else
                {
                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_DECRYPT_BLOCK;
            }
            byte[] decryptedData = out.toByteArray();
            out.close();
            return new String(decryptedData, "UTF-8");
        } catch (Exception e)
        {
            e.printStackTrace();
        }

        return null;
    }

    /**
     * 私钥加密
     *
     * @param encryptingStr
     * @param privateKeyStr
     * @return
     */
    public static String encryptByPrivateKey(String encryptingStr, String privateKeyStr)
    {
        try
        {
            byte[] privateKeyBytes = decryptBase64(privateKeyStr);
            // 获得私钥
            PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes);
            // 取得待加密数据
            byte[] data = encryptingStr.getBytes("UTF-8");
            KeyFactory factory = KeyFactory.getInstance(KEY_RSA);
            PrivateKey privateKey = factory.generatePrivate(keySpec);
            // 对数据加密
            Cipher cipher = Cipher.getInstance(factory.getAlgorithm());
            cipher.init(Cipher.ENCRYPT_MODE, privateKey);
            // 返回加密后由Base64编码的加密信息
            int inputLen = data.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段解密
            while (inputLen - offSet > 0)
            {
                if (inputLen - offSet > MAX_ENCRYPT_BLOCK)
                {
                    cache = cipher.doFinal(data, offSet, MAX_ENCRYPT_BLOCK);
                } else
                {
                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_ENCRYPT_BLOCK;
            }
            byte[] decryptedData = out.toByteArray();
            out.close();
            return encryptBase64(decryptedData);
        } catch (Exception e)
        {
            e.printStackTrace();
        }

        return null;
    }

    /**
     * 公钥解密
     *
     * @param encryptedStr
     * @param publicKeyStr
     * @return
     */
    public static String decryptByPublicKey(String encryptedStr, String publicKeyStr)
    {
        try
        {
            // 对公钥解密
            byte[] publicKeyBytes = decryptBase64(publicKeyStr);
            // 取得公钥
            X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKeyBytes);
            // 取得待加密数据
            byte[] data = decryptBase64(encryptedStr);
            KeyFactory factory = KeyFactory.getInstance(KEY_RSA);
            PublicKey publicKey = factory.generatePublic(keySpec);
            // 对数据解密
            Cipher cipher = Cipher.getInstance(factory.getAlgorithm());
            cipher.init(Cipher.DECRYPT_MODE, publicKey);
            // 返回UTF-8编码的解密信息
            int inputLen = data.length;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            int offSet = 0;
            byte[] cache;
            int i = 0;
            // 对数据分段解密
            while (inputLen - offSet > 0)
            {
                if (inputLen - offSet > MAX_DECRYPT_BLOCK)
                {
                    cache = cipher.doFinal(data, offSet, MAX_DECRYPT_BLOCK);
                } else
                {
                    cache = cipher.doFinal(data, offSet, inputLen - offSet);
                }
                out.write(cache, 0, cache.length);
                i++;
                offSet = i * MAX_DECRYPT_BLOCK;
            }
            byte[] decryptedData = out.toByteArray();
            out.close();
            return new String(decryptedData, "UTF-8");
        } catch (Exception e)
        {
            e.printStackTrace();
        }

        return null;
    }

    /**
     * 用私钥对加密数据进行签名
     *
     * @param encryptedStr
     * @param privateKey
     * @return
     */
    public static String sign(String encryptedStr, String privateKey)
    {
        String str = "";
        try
        {
            //将私钥加密数据字符串转换为字节数组
            byte[] data = encryptedStr.getBytes();
            // 解密由base64编码的私钥
            byte[] bytes = decryptBase64(privateKey);
            // 构造PKCS8EncodedKeySpec对象
            PKCS8EncodedKeySpec pkcs = new PKCS8EncodedKeySpec(bytes);
            // 指定的加密算法
            KeyFactory factory = KeyFactory.getInstance(KEY_RSA);
            // 取私钥对象
            PrivateKey key = factory.generatePrivate(pkcs);
            // 用私钥对信息生成数字签名
            Signature signature = Signature.getInstance(KEY_RSA_SIGNATURE);
            signature.initSign(key);
            signature.update(data);
            str = encryptBase64(signature.sign());
        } catch (Exception e)
        {
            e.printStackTrace();
        }
        return str;
    }

    /**
     * 校验数字签名
     *
     * @param encryptedStr
     * @param publicKey
     * @param sign
     * @return 校验成功返回true，失败返回false
     */
    public static boolean verify(String encryptedStr, String publicKey, String sign)
    {
        boolean flag = false;
        try
        {
            //将私钥加密数据字符串转换为字节数组
            byte[] data = encryptedStr.getBytes();
            // 解密由base64编码的公钥
            byte[] bytes = decryptBase64(publicKey);
            // 构造X509EncodedKeySpec对象
            X509EncodedKeySpec keySpec = new X509EncodedKeySpec(bytes);
            // 指定的加密算法
            KeyFactory factory = KeyFactory.getInstance(KEY_RSA);
            // 取公钥对象
            PublicKey key = factory.generatePublic(keySpec);
            // 用公钥验证数字签名
            Signature signature = Signature.getInstance(KEY_RSA_SIGNATURE);
            signature.initVerify(key);
            signature.update(data);
            flag = signature.verify(decryptBase64(sign));
        } catch (Exception e)
        {
            e.printStackTrace();
        }
        return flag;
    }

}
